<div *ngIf="config">
  <form nz-form [formGroup]="form">
    <nz-form-item>
      <nz-form-label [nzSpan]="7" nzRequired>类名</nz-form-label>
      <nz-form-control [nzSpan]="12" nzErrorTip="类名是必须的">
        <input nz-input formControlName="className" placeholder="输入全路径类名，必须填" />
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSpan]="7" nzRequired>方法名</nz-form-label>
      <nz-form-control [nzSpan]="12" nzErrorTip="方法名是必须的">
        <input nz-input formControlName="methodName" placeholder="输入这个类的一个方法名，必须填" />
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSpan]="7">方法参数</nz-form-label>
      <nz-form-control [nzSpan]="12">
        <input nz-input formControlName="methodParams" placeholder="输入方法参数，可以是Json字符串，可选填" />
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSpan]="7" nzRequired>cron表达式</nz-form-label>
      <nz-form-control [nzSpan]="12" nzErrorTip="cron表达式是必须的">
        <input nz-input formControlName="cronExpression" placeholder="输入cron表达式，必须填" />
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSpan]="7">备注</nz-form-label>
      <nz-form-control [nzSpan]="12">
        <input nz-input formControlName="remark" placeholder="输入备注，可选填" />
      </nz-form-control>
    </nz-form-item>

    <nz-form-item>
      <nz-form-label [nzSpan]="7" nzRequired>状态</nz-form-label>
      <nz-form-control [nzSpan]="12" nzErrorTip="状态是必须的">
        <nz-switch formControlName="enabled" nzCheckedChildren="启用" nzUnCheckedChildren="禁用"></nz-switch>
      </nz-form-control>
    </nz-form-item>
  </form>
  <div *nzModalFooter>
    <button nz-button style="margin-right: 8px" (click)="setValueForm()">重置</button>
    <button nz-button nzType="primary" [disabled]="!(form.valid && form.dirty)" (click)="sure()">确认</button>
  </div>
</div>
